package com.duoduo.admin.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import lombok.Data;

@Entity
@Data
@EntityListeners(AuditingEntityListener.class)
public class SysDictItem implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4590307808793457087L;

	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
     /**
	 * ID
	 */
	private Long id;
	
	@ManyToOne(cascade={CascadeType.MERGE,CascadeType.REFRESH},optional=false)
	@JoinColumn(name="dict_id")
	private SysDict sysDict;
     /**
	 * 字典标识
	 */
	private String dictKey;
     /**
	 * 值
	 */
	private String value;
     /**
	 * 标签
	 */
	private String label;
     /**
	 * 字典类型
	 */
	private Integer type;
     /**
	 * 描述
	 */
	private String description;
     /**
	 * 排序
	 */
	private Integer sortOrder;
     /**
	 * 备注
	 */
	private String remark;
     /**
	 * 删除标识
	 */
	private Boolean delFlag;
     /**
	 * 创建人
	 */
    @CreatedBy
	private String createBy;
     /**
	 * 创建时间
	 */
    @CreatedDate
	private LocalDateTime createTime;
     /**
	 * 修改人
	 */
    @LastModifiedBy
	private String updateBy;
     /**
	 * 更新时间
	 */
    @LastModifiedDate
	private LocalDateTime updateTime;

}
